#ifndef	_HASH_H_
#define	_HASH_H_
#include <stdint.h>

typedef	struct hash hash_t;
typedef	uint32_t (*hashfunc_t)(uint32_t,void *);

hash_t* hash_alloc(uint32_t buckets, hashfunc_t hash_func);
void* hash_lookup_entry(hash_t *hash, void* key, uint32_t key_size);
void hash_add_entry(hash_t *hash, void *key, uint32_t key_size,
							 void *value, uint32_t value_size);
void hash_free_entry(hash_t *hash, void *key, uint32_t key_size);

#endif
